﻿using System;
using System.Collections.Generic;
using Model_SSResourceManager;


namespace Presenter_SSResourceManager
{
    public class PresenterMyQueusView
    {
        private readonly ModelsManager _mModel;
        private readonly IViewMyQueues _viewMyQueues;

        public PresenterMyQueusView(IViewMyQueues view)
        {
            this._viewMyQueues = view;
            _mModel = ModelInstanse.Get();
        }

        public string GetResourceName(Object resourceId)
        {
            return _mModel.resourceModel.Get(Guid.Parse(resourceId.ToString())).Name;
        }

        public void Refresh(Guid userId)
        {
            _viewMyQueues.ShowQueues(_mModel.queueModel.GetAllForUser(userId));
        }

    }

}
